<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <title><?php echo $this->_siteConfig->name;?></title>
    <link type="image/x-icon" href="<?php echo IUrl::creatUrl("")."favicon.ico";?>" rel="icon">
    <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="apple-touch-icon-precomposed" href="<?php echo $this->getWebSkinPath()."image/logo.gif";?>">
    <script type="text/javascript" charset="UTF-8" src="/git/micarshop/runtime/_systemjs/jquery/jquery-1.12.4.min.js"></script> <script type="text/javascript" charset="UTF-8" src="/git/micarshop/runtime/_systemjs/form/form.js"></script> <script type="text/javascript" charset="UTF-8" src="/git/micarshop/runtime/_systemjs/autovalidate/validate.js"></script><link rel="stylesheet" type="text/css" href="/git/micarshop/runtime/_systemjs/autovalidate/style.css" /> <script type="text/javascript" charset="UTF-8" src="/git/micarshop/runtime/_systemjs/artdialog/artDialog.js"></script><script type="text/javascript" charset="UTF-8" src="/git/micarshop/runtime/_systemjs/artdialog/plugins/iframeTools.js"></script><link rel="stylesheet" type="text/css" href="/git/micarshop/runtime/_systemjs/artdialog/skins/aero.css" /> <script type="text/javascript" charset="UTF-8" src="/git/micarshop/runtime/_systemjs/artTemplate/artTemplate.js"></script><script type="text/javascript" charset="UTF-8" src="/git/micarshop/runtime/_systemjs/artTemplate/artTemplate-plugin.js"></script>
    <script src="<?php echo $this->getWebViewPath()."javascript/common.js";?>"></script>
    <script src='<?php echo $this->getWebViewPath()."javascript/site.js";?>'></script>
    <link rel="stylesheet" href="<?php echo $this->getWebSkinPath()."style/style.css";?>">
</head>

<body>
    <!-- 顶部通栏 -->
    <header class="header_box">
        <div class="header">
            <?php if(IWeb::$app->getController()->getId() == 'site' && IWeb::$app->getController()->getAction()->getId() == 'index'){?>
            <div class="header_home"><i class="icon-home"></i></div>
            <?php }else{?>
            <div class="header_back" onclick="window.history.back();"><i class="icon-chevron-left"></i></div>
            <?php }?>
            <h1 id="page_title" class="page_title"><?php echo $this->_siteConfig->name;?></h1>
        
            <!-- <div class="header_so_btn" onclick="$('.header_search').toggle();"><i class="icon-search"></i></div> -->
            <div class="header_so_btn" onclick="jump_url()"><i class="icon-search"></i></div>
        
        </div>
    </header>
    <!-- 顶部搜索 -->
    <section class="header_search">
        <form method='get' action="<?php echo IUrl::creatUrl("/");?>">
            <input type='hidden' name='controller' value='site'>
            <input type='hidden' name='action' value='search_list'>
            <input class="keywords" type="text" name='word' autocomplete="off" placeholder="请输入关键词...">
            <input class="submit" type="submit" value="搜索">
        </form>
    </section>
    <!-- 引入内页 -->
    <section class="viewport">
        <div id="pageInfo" data-title="我的订单"></div>
<link rel="stylesheet" href="<?php echo $this->getWebSkinPath()."style/mui.css";?>">
<script type="text/javascript" src="<?php echo $this->getWebViewPath()."javascript/mui.js";?>"></script>

<script type="text/javascript">

mui.init();

</script>
<style>
body{
	background: #EFEFF4;
}
.header_so_btn{
	display: none;
}



.item{
	margin-bottom: 0.2rem;
} 

.desc{
	display: flex;	
	
}

.viewport{
	background: #EFEFF4;
}

.desc div{
	width: 25%;
	height: 0.6rem;
	align-items:baseline ;
	font: 0.13rem/0.6rem "微软雅黑";
	text-align: center;
}

.desc div:nth-of-type(1) img{
	width: 100%;
	height: 0.6rem;
}

.desc div:nth-of-type(2){
	width: 50%;
	border-left: 2px solid #f5f5f5;
	border-right: 2px solid #f5f5f5;
}

.desc div:nth-of-type(2) span{
	display:inline-block;
	white-space:nowrap;
	text-overflow:ellipsis;
	overflow: hidden;
	width: 100%;
	height: 0.4rem;
	
}

/*中间的标题*/
/*
.desc img{
	margin-left:0.2rem;
	width: 0.5rem;
	height: 0.5rem;
	border: 1px solid red;
}
.desc span:nth-of-type(1){
	margin-left: 0.4rem;
	width: 1rem;
	height:0.5rem;
	border: 1px solid red;
	display: inline-block;
}

.desc span:nth-of-type(2){
	margin-right: 0.2rem;
	float: right;
	margin-top: 0.14rem;	
}

*/

a{
	color:black;
}

/*页脚*/
.sfoot a{
	display: block;
	width: 100%;
	color:blue;
	
}


</style>
<section class="user_order">
	<?php $user_id = $this->user['user_id']?>
    <?php $queryOrderList = Api::run('getOrderList',$user_id)?>
    <?php $orderList = $queryOrderList->find()?>
    
    <!-- 
    <?php foreach($orderList as $k => $v){?>
    	
    	<?php foreach($v as $k1 => $v1){?>
    		key:<?php echo isset($k1)?$k1:"";?>---value:<?php echo isset($v1)?$v1:"";?><br/>
    	<?php }?>
    <?php }?>
     -->
    <?php if($orderList){?>
    <!-- 
	<ul class="user_list">
		<?php foreach($orderList as $key => $item){?>
        <li>
			<i class="icon-chevron-right"></i>
			<a href="<?php echo IUrl::creatUrl("/ucenter/order_detail/id/".$item['id']."");?>">订单号：<?php echo isset($item['order_no'])?$item['order_no']:"";?></a>
			
		</li>
        <?php }?>
	</ul>
	<?php echo $queryOrderList->getPageBar();?> -->
	
	<?php foreach($orderList as $key => $item){?>
		
		<?php $order_id=$item['id']?> 
		<?php foreach(Api::run('getOrderGoodsListByGoodsid',array('#order_id#',$order_id)) as $key => $good){?> <?php $good_info = JSON::decode($good['goods_array'])?>
			<div class="mui-card item">
				<!--页眉，放置标题-->
				<div class="mui-card-header">
					<?php $query = new IQuery("seller");$query->where = "id = $item[seller_id]";$items = $query->find(); foreach($items as $key => $sl){?>
						<p><?php echo isset($sl['store_name'])?$sl['store_name']:"";?></p>
					<?php }?>
					<!-- <p><?php echo isset($item['order_no'])?$item['order_no']:"";?></p> -->
				</div>
				<!--内容区-->
				<div class="mui-card-content desc">
					<div>
						<img alt="商品图片" src="<?php echo IUrl::creatUrl("/pic/thumb/img/".$good['img']."");?>">
					</div>
					<div>
						<span><?php echo isset($good_info['name'])?$good_info['name']:"";?></span>
					</div>
					<div>
						<span>￥<?php echo isset($good['goods_price'])?$good['goods_price']:"";?></span>
					</div>
				</div>
				<!--页脚，放置补充信息或支持的操作-->
				<div class="mui-card-footer sfoot">
					<a href="<?php echo IUrl::creatUrl("/ucenter/order_detail/id/".$item['id']."");?>">查看订单</a>
					<span>></span>
				</div>
			</div>
		<?php }?>
	<?php }?>
	


	
	<?php }else{?>
    <div class="nodata">当前暂无数据</div>
    <?php }?>
    
    
</section>
<script>
$(function(){
	//hideNav()
})
</script>

    </section>
    <!-- 会员登陆与否显示不同内容 -->
    <?php if($this->user){?>
    <?php }else{?>
    <!-- 
    <section class="footer_login">
        <a class="login" href="<?php echo IUrl::creatUrl("simple/login");?>">登录</a>
        <a class="reg" href="<?php echo IUrl::creatUrl("simple/reg");?>">注册</a>
    </section> -->
    <?php }?>
    <!--底部菜单-->
    <nav class="footer_nav">
        <ul>
            <li class="nav_home"><a href="<?php echo IUrl::creatUrl("site");?>"><i class="icon-home"></i><span>首页</span></a></li>
            <li class="nav_cart"><a href="<?php echo IUrl::creatUrl("simple/cart");?>"><i class="icon-shopping-cart"></i><span>购物车</span></a></li>
            <li class="nav_user"><a href="<?php echo IUrl::creatUrl("/ucenter/index");?>"><i class="icon-user"></i><span>个人中心</span></a></li>
            <li class="nav_map"><a href="<?php echo IUrl::creatUrl("site/sitemap");?>"><i class="icon-reorder"></i><span>分类</span></a></li>
        </ul>
    </nav>
    <script src='<?php echo $this->getWebViewPath()."javascript/mobile.js";?>'></script>
</body>

</html>

<script type="text/javascript">

var ex = "http://"+window.location.host+"/";
function jump_url(){
	
	//window.location.href = ex+"site/goseachpage";
	window.location.href = ex+"git/micarshop/site/goseachpage";
	
}

</script>

